﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Common;

namespace Vit.SchemaExplorer
{
    [Serializable]
    public class ParameterSchema : SchemaObjectBase
    {
        public DbType DataType { get; set; }
        public string NativeType { get; set; }
        public byte? Precision { get; set; }
        public int? Scale { get; set; }
        public int? Size { get; set; }
        public ParameterDirection Direction { get; set; }
        public Type SystemType
        {
            get
            {
                return this.Schema.Database.SchemaProvider.ToSystemType(this.NativeType, false);
            }
        }

        public int Order { get; set; }

        [System.Xml.Serialization.XmlIgnore()]
        [System.Xml.Serialization.SoapIgnore()]
        public CommandSchema Command { get; set; }
    }
}
